<!DOCTYPE HTML>
<html>
<head>
<title>文件列表</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="__PUBLIC__/Admin/css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="__PUBLIC__/Admin/css/style.css" rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="__PUBLIC__/Admin/css/morris.css" type="text/css"/>
<!-- Graph CSS -->
<link href="__PUBLIC__/Admin/css/font-awesome.css" rel="stylesheet"> 
<!-- jQuery -->
<script src="__PUBLIC__/Admin/js/jquery-2.1.4.min.js"></script>
<!-- //jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="__PUBLIC__/Admin/css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->
</head> 
<body>
   <div class="page-container">
   <!--/content-inner-->
<div class="left-content">
	   <div class="mother-grid-inner">
             <!--header start here-->
				
				<include file="Public/header" />
				
<!--heder end here-->
	<ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="{:U('Index/index')}">首页</a><i class="fa fa-angle-right"></i>文件</li>
            </ol>
<div class="inbox-mail">


<!-- tab content -->
<div class="col-md-8 tab-content tab-content-in w3">


<div class="tab-pane text-style active" id="tab1">

    <div class="form-group" style="line-height:34px;">
        <div class="col-sm-10" style="padding-right:0;">
            <foreach name="filecate" item="cate">
                <a href="{:U('File/file',array('cid'=>$cate['cid']))}" style="margin-right:2px;"><span class="label label-success">{$cate.name}</span></a>
            </foreach>
            <a href="{:U('File/filebin')}"><span class="label label-info">回收站</span></a>
        </div>
    </div>

  <div class="inbox-right">
            <div class="mailbox-content">
                <table class="table">
                    <tr class="table-row">
                        <td>
                            文件名称
                        </td>
						<td>
                            所属栏目
                        </td>
                        <td>
                            文件简介
                        </td>
                        <td>
                            标签
                        </td>
                        <td class="march">
                            上传时间
                        </td>
                        <td>下载</td>
                        <td>回收站</td>
                    </tr>
                    <tbody>
                        <foreach name="file_list" item="file">
                            <tr class="table-row">
                                <td>
                                    {$file.ori_name}
                                </td>
								<td>
									<?php
										foreach($filecate as $cate){
										    if(I('get.cid')==''){
										        if($file['cid']==$cate['cid']){
										            echo $cate['name'];
										        }
										    }else if($cate['cid']==I('get.cid')){
												echo $cate['name'];
											}
										}
									?>
                                </td>
                                <td>
                                    {$file.intro}
                                </td>
                                <td>
                                    <span class="fam">{$file.label}</span>
                                </td>
                                <td class="march">
                                    {$file.time}
                                </td>
                                <td><a class="agile-icon" href="{:U('File/download',array('fid'=>$file['fid']))}"><i class="fa fa-download icon_9"></i></a></td>
                                <td><a href="{:U('File/filedel',array('fid'=>$file['fid']))}" onclick="if(!confirm('确实要放进回收站吗?')){return false;};" ><i class="fa fa-trash-o"></i></td>
                            </tr>
                        </foreach>
                    </tbody>
                </table>
            </div>
      <?php if($file_count>10){ ?>
      <?php if(isset($_GET['cid'])){?>
      <nav>
          <ul class="pagination">
              <li><a href="file.html?cid=<?php echo I('get.cid'); ?>&start=<?php echo I('get.start')-10; ?>" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
              <?php for($i=0,$num=0,$page=1;$num<((int)($file_count/$pagecount)+1);$i=$i+10,$num++,$page++){?>
              <li><a href="file.html?cid=<?php echo I('get.cid'); ?>&start=<?php echo $i;?>"><?php echo $page;?> </a></li>
              <?php }?>
              <li><a href="file.html?cid=<?php echo I('get.cid'); ?>&start=<?php echo I('get.start')+10; ?>" aria-label="Previous"><span aria-hidden="true">»</span></a></li>
          </ul>
      </nav>
      <?php }else{?>
      <nav>
          <ul class="pagination">
              <li><a href="file.html?start=<?php echo I('get.start')-10; ?>" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
              <?php for($i=0,$num=0,$page=1;$num<((int)($file_count/$pagecount)+1);$i=$i+10,$num++,$page++){?>
              <li><a href="file.html?start=<?php echo $i;?>"><?php echo $page;?> </a></li>
              <?php }?>
              <li><a href="file.html?start=<?php echo I('get.start')+10; ?>" aria-label="Next"><span aria-hidden="true">»</span></a></li>
          </ul>
      </nav>
      <?php }?>
      <?php }?>

               </div>
</div>

</div>
<div class="clearfix"> </div>
   </div>
<!-- script-for sticky-nav -->
		<script>
		$(document).ready(function() {
			 var navoffeset=$(".header-main").offset().top;
			 $(window).scroll(function(){
				var scrollpos=$(window).scrollTop(); 
				if(scrollpos >=navoffeset){
					$(".header-main").addClass("fixed");
				}else{
					$(".header-main").removeClass("fixed");
				}
			 });
			 
		});
		</script>
		<!-- /script-for sticky-nav -->
<!--inner block start here-->
<div class="inner-block">

</div>
<!--inner block end here-->
<!--copy rights start here-->
<!--COPY rights end here-->
</div>
</div>
  <!--//content-inner-->
		<!--/sidebar-menu-->
				
								<include file="Public/category" />

							  <div class="clearfix"></div>		
							</div>
							<script>
							var toggle = true;
										
							$(".sidebar-icon").click(function() {                
							  if (toggle)
							  {
								$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
								$("#menu span").css({"position":"absolute"});
							  }
							  else
							  {
								$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
								setTimeout(function() {
								  $("#menu span").css({"position":"relative"});
								}, 400);
							  }
											
											toggle = !toggle;
										});
							</script>
<!--js -->
<script src="__PUBLIC__/Admin/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/Admin/js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
   <script src="__PUBLIC__/Admin/js/bootstrap.min.js"></script>
   <!-- /Bootstrap Core JavaScript -->	   

</body>
</html>